export const colOptions = {
  colWidth: '200',
  tableAlign: 'center',
  showOverflowTooltip: false
}

export const colUnits = [
  // 输入框
  {
    title: '输入框',
    type: 'table_input',
    group: 'field',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      defaultValue: '',
      columnWidth: '200px',
      placeholder: '',
      colSummary: '',
      colSummaryHandle: "",
      colSpanMethod: false,
      readonly: false,
      disabled: false,
      required: false,
      requiredHint: '',
      clearable: false,
      inputType: null,
      minLength: 0,
      maxLength: null,
      validation: '',
      validationHint: '',
      size: '',
      // ------------------
      labelIconClass: null,
      labelTooltip: null,
      // ------------------
      onListener: '',
      onPush: '',
      onChange: '',
      onCreated: '',
    }
  },
  // 多行输入框
  {
    title: '多行输入框',
    type: 'table_textarea',
    group: 'field',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      defaultValue: '',
      columnWidth: '200px',
      autosize: false,
      rows: 3,
      placeholder: '',
      colSpanMethod: false,
      readonly: false,
      disabled: false,
      required: false,
      requiredHint: '',
      validation: '',
      validationHint: '',
      size: '',
      // ------------------
      minLength: null,
      maxLength: null,
      showWordLimit: false,
      // ------------------
      onListener: '',
      onPush: '',
      onChange: '',
      onCreated: '',
    }
  },
  // 计数器
  {
    title: '计数器',
    type: 'table_number',
    group: 'field',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      columnWidth: '200px',
      defaultValue: 0,
      colSummary: '',
      colSummaryHandle: "",
      colSpanMethod: false,
      readonly: false,
      disabled: false,
      required: false,
      requiredHint: '',
      size: '',
      // ------------------
      min: -100000000000,
      max: 100000000000,
      precision: 0,
      step: 1,
      controlsPosition: 'right',
      // ------------------
      onListener: '',
      onPush: '',
      onChange: '',
      onCreated: '',
    }
  },
  // 单选组
  {
    title: '单选组',
    type: 'table_radio',
    group: 'field',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      columnWidth: '200px',
      defaultValue: null,
      readonly: false,
      disabled: false,
      required: false,
      requiredHint: '',
      colSummary: '',
      colSummaryHandle: "",
      size: '',
      // ------------------
      displayStyle: 'inline',
      buttonStyle: false,
      border: false,
      optionItems: [
        { label: 'radio 1', value: 1 },
        { label: 'radio 2', value: 2 },
        { label: 'radio 3', value: 3 },
      ],
      optionItemsAsync: '',
      // ------------------
      onListener: '',
      onPush: '',
      onChange: '',
      onCreated: '',
    }
  },
  // 复选组
  {
    title: '复选组',
    type: 'table_checkbox',
    group: 'field',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      columnWidth: '200px',
      defaultValue: [],
      readonly: false,
      disabled: false,
      required: false,
      requiredHint: '',
      size: '',
      // ------------------
      displayStyle: 'inline',
      buttonStyle: false,
      border: false,
      optionItems: [
        { label: 'check 1', value: 1 },
        { label: 'check 2', value: 2 },
        { label: 'check 3', value: 3 },
      ],
      optionItemsAsync: '',
      // ------------------
      onListener: '',
      onPush: '',
      onChange: '',
      onCreated: '',
    }
  },
  // 下拉选择
  {
    title: '下拉选择',
    type: 'table_select',
    group: 'field',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      columnWidth: '200px',
      defaultValue: null,
      colSpanMethod: false,
      readonly: false,
      disabled: false,
      required: false,
      requiredHint: '',
      colSummary: '',
      colSummaryHandle: "",
      size: '',
      // ------------------
      clearable: true,
      filterable: false,
      allowCreate: false,
      // remote: false,
      automaticDropdown: false, // 自动下拉
      multiple: false,
      multipleLimit: 0,
      optionItems: [
        { label: 'select 1', value: 1 },
        { label: 'select 2', value: 2 },
        { label: 'select 3', value: 3 },
      ],
      optionItemsAsync: '',
      // ------------------
      onListener: '',
      onPush: '',
      onChange: '',
      onCreated: '',
    }
  },
  // 联级选择器
  {
    title: '联级选择器',
    type: 'table_cascader',
    group: 'field',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      columnWidth: '200px',
      defaultValue: [],
      colSpanMethod: false,
      disabled: false,
      required: false,
      requiredHint: '',
      size: '',
      // ------------------
      clearable: true,
      filterable: false,
      allowCreate: false,
      mmultiple: false,
      checkStrictly: false, // 可选择任意一级选项，默认不开启
      showAllLevels: true, // 显示完整路径
      optionItems: [
        { label: 'select 1', value: 1, children: [{ label: 'child 1', value: 11 }] },
        { label: 'select 2', value: 2 },
        { label: 'select 3', value: 3 },
      ],
      optionItemsAsync: '',
      // ------------------
      onListener: '',
      onPush: '',
      onChange: '',
      onCreated: '',
    }
  },
  // 日期
  {
    title: '日期',
    type: 'table_date',
    group: 'field',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      type: 'date',
      columnWidth: '200px',
      defaultValue: null,
      colSpanMethod: false,
      readonly: false,
      disabled: false,
      required: false,
      requiredHint: '',
      size: '',
      // ------------------

      clearable: true,
      editable: false,
      format: 'yyyy-MM-dd', // 日期显示格式
      valueFormat: 'yyyy-MM-dd', // 日期对象格式
      // ------------------
      onListener: '',
      onPush: '',
      onChange: '',
      onCreated: '',
    }
  },
  // 日期范围
  {
    title: '日期范围',
    type: 'table_date_range',
    group: 'field',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      type: 'daterange',
      startPlaceholder: '',
      endPlaceholder: '',
      columnWidth: '200px',
      defaultValue: null,
      colSpanMethod: false,
      readonly: false,
      disabled: false,
      required: false,
      requiredHint: '',
      size: '',
      // ------------------
      clearable: true,
      editable: false,
      format: 'yyyy-MM-dd', // 日期显示格式
      valueFormat: 'yyyy-MM-dd', // 日期对象格式
      // ------------------
      onListener: '',
      onPush: '',
      onChange: '',
      onCreated: '',
    }
  },
  // 开关
  {
    title: '开关',
    type: 'table_switch',
    group: 'field',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      startPlaceholder: '',
      endPlaceholder: '',
      columnWidth: '200px',
      defaultValue: null,
      readonly: false,
      disabled: false,
      required: false,
      requiredHint: '',
      size: '',
      // ------------------
      switchWidth: 40,
      activeText: '',
      inactiveText: '',
      activeColor: null,
      inactiveColor: null,
      // ------------------
      onListener: '',
      onPush: '',
      onChange: '',
      onCreated: '',
    }
  },
  // 静态文字
  {
    title: '静态文字',
    type: 'table_static',
    group: 'static',
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      columnWidth: '200px',
      hidden: false,
      textContent: 'static text',
      textAlign: 'left',
      fontSize: '13px',
      preWrap: false, // 是否自动换行
      // -------------------
      customClass: '', // 自定义css类名
      // -------------------
      onCreated: '',
      onMounted: '',
    },
  },
  // 按钮
  {
    title: '按钮',
    type: 'table_button',
    group: 'field',
    formItemFlag: false,
    options: {
      tableColField: null,
      tableLabel: '',
      name: '',
      columnWidth: '200px',
      size: '',
      displayStyle: 'block',
      disabled: false,
      hidden: false,
      buttonLabel: '',
      buttonType: 'primary',
      perviewShow: false,
      plain: false,
      round: false,
      circle: false,
      icon: null,
      // -------------------
      customClass: '', // 自定义css类名
      // -------------------
      onCreated: '',
      onMounted: '',
      onClick: '',
    },
  },
]
